<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>学生管理系统</title>
        <style>
        body{
            height: 460px;
        }
        table,th,td{
            border: 1px solid black;
        }
        table{
            width:100%;
            border-collapse:collapse;
        }
        th{
             background-color:#F5F5DC;
        }
        tr:hover {
          background-color: #ddd;
        }
        td{
            text-align: center;
        }
       .head, #footer{
          background-color: #87CEFA;
          padding: 20px;
          text-align: center;
       }
       .head h1{
            text-align:center;
       }
       .container{
              background-color: #f1f1f1;
              margin: 20px auto;
              padding: 20px;
              height: 100%;
              width: 90%;
        }
       .head_container{
              margin: 20px auto;
              padding: 20px;
        }
        .add_container{
            float: left;
        }
        .search_container{
            float: right;
        }
    </style>
</head>
<body>
<div class="head">
    <h1>学生管理系统</h1>
</div>
    <div>
        <a href="/stu/add">新增</a> <br/>
        <form action="/stu/student" method="get">
            <label ></label>
            <input type="text" placeholder="搜索内容" name="search" id="search">
            <input type="submit" value="搜索">
        </form>
        <table>
            <tr>
                <th>学号</th>
                <th>姓名</th>
                <th>年龄</th>
                <th>班级</th>
                <th>邮箱</th>
                <th>地址</th>
                <th>操作</th>
            </tr>
                {% for s in students %}
            <tr>
                <td>{{ s.sid }}</td>
                <td>{{ s.name }}</td>
                <td>{{ s.age }}</td>
                <td>{{ s.s_class }}</td>
                <td>{{ s.email }}</td>
                <td>{{ s.address }}</td>
                <td>
                    <a href='/stu/modify/{{ s.sid }}'>修改</a>
                    <a href='/stu/delete/{{ s.sid }}'>删除</a>
                </td>
            </tr>
                {% endfor %}
        </table>
    </div>
<div id="footer">
    {% block footer %} &copy; Copyright 2023 by
    <a href="https://ceshiren.com">测试人社区</a>. {% endblock %}
</div>
</body>
</html>